package kr.hkit.androidcomplete02.fragment;

import android.app.Activity;
import android.content.res.Configuration;
import android.os.Bundle;

public class PlanetDescActivity extends Activity {
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
			finish();
			return;
		}
		int index = getIntent().getExtras().getInt("index");
		PlanetDescFragment details = PlanetDescFragment.newInstance(index);
		getFragmentManager().beginTransaction()
				.add(android.R.id.content, details).commit();
	}
}
